package com.yuri.platform.utils.file;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum FileTypeEnum {
    JPEG("FFD8FF", "image", "jpeg", "image/jpeg"),
    JPG("FFD8FFE000", "image", "jpg", "image/jpg"),
    PNG("89504E47", "image", "png", "image/png"),
    MP4("\\w{8}66747970", "video", "mp4", "video/mp4"),
    MPG("000001BA", "video", "mpg", "video/mpeg"),
    MPEG("000001B3", "video", "mpeg", "video/mpeg"),
    AVI("52494646", "video", "avi", "video/x-msvideo"),
    NONE("none", "none", "none", "none"),
    ERROR("error", "error", "error", "error");
    //    表示文件类型的16进制字符串
    private final String hexHeader;
    //    文件通用表示
    private final String commonType;
    //    文件扩展名
    private final String extType;
    //    mime 文件类型
    private final String mimeType;
}
